package com.ruoyi.business.service;

import org.apache.ibatis.session.SqlSession;

/**
 * 数据源服务接口
 */
public interface IDataSourceService {
    /**
     * 切换数据源
     * @param dataSourceName
     * @return
     */
    public SqlSession switchDataSource(String dataSourceName);

    /**
     * 构造数据源key
     * @param enterpriseCode
     * @param applicationCode
     * @param dataSourceName
     * @return
     */
    public String getKey(String enterpriseCode, String applicationCode,String dataSourceName);

    /**
     * 根据key获取数据源名称
     * @param key
     * @return
     */
    public String getDataSourceNameFromKey(String key);
}
